Google Workspace
Step 1: Enable API
- Enable the G Suite Alert Center API:
- Navigate to Google Cloud Console:
- Choose APIs & Services > Library.
- If no project exists, create one:
- Click Dropdown > New Project.
- Provide a project Name and Location.
- Select the newly created project and click Open.
- Ensure the notification for project creation is completed before proceeding.
- Search for Admin SDK API and press Enable.
- Navigate to Google Cloud Console:
Step 2: Creating a Service Account
-
Access IAM & Admin:
- In the top-left corner of the GCP console, click Menu.
- Navigate to IAM & Admin > Service Accounts.
-
Create a New Service Account:
- Click Create Service Account and fill in the Service account name field.
- (Optional) Enter a description for the service account.
- Click Create.
- Click Create Service Account and fill in the Service account name field.
-
Assign a Role to the Service Account:
- Assign the role of Project Viewer or a more specific role to the new account.
- Click Continue.
-
Manage Keys and Generate a P12 Key:
- Navigate to the service account you created, and click Manage Keys.
- Follow these steps to generate the P12 key:
-
Click Add Key > Create New Key.
-
Ensure the key type is set to P12 and click Create.
-
Download the P12 Key:
- You’ll see a message that the P12 file has been downloaded to your computer.
-
Note the Secret:
- Set the private key password to notasecret.
-
Make a Note of the File:
- Make a note of the file’s location and name for future reference.
-
Click Close.
-
Step 3: Adding the Service Account to G Suite
-
Access the G Suite Admin Console:
- Go to your G Suite domain’s Admin console.
- Search for API Controls in the search bar.
-
Manage Domain-Wide Delegations:
- Click Manage Domain Wide Delegations.
- From the Authentication section, click Add New.
-
Provide Client ID and OAuth Scopes:
- In the Client ID field, enter the OAuth 2 client ID of the service account (found in the Google Cloud Console under IAM & Admin > Service Accounts).
- In the OAuth Scopes field, enter the required scopes for accessing the reports API:
https://www.googleapis.com/auth/admin.reports.audit.readonly
- Click Authorize.
Deliverables
Please email them to support@threatdefence.com
-
P12 Key:
- Ensure the secure storage of the downloaded P12 file.
-
Service Account Email Address:
- Navigate to IAM & Admin > Service Accounts in the Google Cloud Console to retrieve the service account email.
-
Administrator Email Address:
- Provide the email address used to configure the service account.